package com.cyw.baselibrary.imageloader;

import android.content.Context;
import android.widget.ImageView;

import com.cyw.baselibrary.R;

public class ImageLoadBuilder {

    public Object loadObj;//加载的图片对象，可以是图片url、图片文件等
    private int placeHolder;
    private ImageView imgView;
    private Context context;
    private int overWidth;
    private int overHeight;

    public ImageLoadBuilder() {
        this.placeHolder = R.mipmap.icon_load_default;
    }

    public ImageLoadBuilder load(Object loadObj) {
        this.loadObj = loadObj;
        return this;
    }

    public ImageLoadBuilder with(Context context) {
        this.context = context;
        return this;
    }

    public ImageLoadBuilder placeHolder(int placeHolder) {
        this.placeHolder = placeHolder;
        return this;
    }

    public ImageLoadBuilder imgView(ImageView imgView) {
        this.imgView = imgView;
        return this;
    }

    public ImageLoadBuilder overWidth(int width) {
        this.overWidth = width;
        return this;
    }

    public ImageLoadBuilder overHeight(int height) {
        this.overHeight = height;
        return this;
    }


    public Object getLoadObj() {
        return loadObj;
    }

    public int getPlaceHolder() {
        return placeHolder;
    }

    public ImageView getImgView() {
        return imgView;
    }

    public Context getContext() {
        return context;
    }

    public int getOverWidth() {
        return overWidth;
    }

    public int getOverHeight() {
        return overHeight;
    }
}
